(insert "#include <cstdio>\n")
(insert "#include <iostream>\n")
(insert "#include <algorithm>\n")
(insert "#include <cmath>\n")
(insert "#include <cstring>\n")
(insert "\n")
(insert "namespace IO {\n")
(insert "    template <typename _T>\n")
(insert "    inline bool read (_T& x) {\n")
(insert "        x = 0;\n")
(insert "        _T y = 1;\n")
(insert "        char c = getchar();\n")
(insert "        while ((c < '0' || '9' < c) && c != EOF) {\n")
(insert "            if (c == '-') y = -1;\n")
(insert "            c = getchar();\n")
(insert "        }\n")
(insert "        if (c == EOF) return false;\n")
(insert "        while ('0' <= c && c <= '9') x = x * 10 + c - '0', c = getchar();\n")
(insert "        x *= y;\n")
(insert "        return true;\n")
(insert "    }\n")
(insert "\n")
(insert "    template <typename _T>\n")
(insert "    inline _T input () {\n")
(insert "        _T x = 0, y = 1;\n")
(insert "        char c = getchar();\n")
(insert "        while ((c < '0' || '9' < c) && c != EOF) {\n")
(insert "            if (c == '-') y = -1;\n")
(insert "            c = getchar();\n")
(insert "        }\n")
(insert "        if (c == EOF) return 0;\n")
(insert "        while ('0' <= c && c <= '9') x = x * 10 + c - '0', c = getchar();\n")
(insert "        x *= y;\n")
(insert "        return x;\n")
(insert "    }\n")
(insert "};\n")
(insert "using namespace IO;\n")
(insert "\n")
(insert "#define reg register\n")
(insert "#define debug(...) fprintf(stderr, __VA_ARGS__)\n")
(insert "#define rep(i, l, r) for(int i = l; i <= r; ++i)\n")
(insert "#define lep(i, l, r) for(int i = l; i < r; ++i)\n")
(insert "#define irep(i, r, l) for(int i = r; i >= l; --i)\n")
(insert "#define ilep(i, r, l) for(int i = r; i > l; --i)\n")
(insert "typedef long long ll;\n")
(insert "\n")
(insert "int main () {\n")
(insert "#ifdef LOCAL\n")
(insert "#endif\n")
(insert "    return 0;\n")
(insert "}\n")
